home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / futils / futils~1 / src / text11s.zoo / text1.1 / lib / linebuffer.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-11-02  |  1.3 KB  |  40 lines

  1. /* linebuffer.h -- declarations for reading arbitrarily long lines
  2.    Copyright (C) 1986, 1991 Free Software Foundation, Inc.
  3.  
  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 2, or (at your option)
  7.    any later version.
  8.  
  9.    This program is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.    GNU General Public License for more details.
  13.  
  14.    You should have received a copy of the GNU General Public License
  15.    along with this program; if not, write to the Free Software
  16.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  17.  
  18. /* Written by Richard Stallman. */
  19.  
  20. /* A `struct linebuffer' holds a line of text. */
  21.  
  22. struct linebuffer
  23. {
  24.   long size;            /* Allocated. */
  25.   long length;            /* Used. */
  26.   char *buffer;
  27. };
  28.  
  29. #ifdef __STDC__
  30. /* Initialize a linebuffer for use. */
  31. void initbuffer (struct linebuffer *);
  32.  
  33. /* Read a line from a stream into a linebuffer;
  34.    works regardless of the length of the line.  */
  35. struct linebuffer *readline (struct linebuffer *, FILE *);
  36. #else
  37. void initbuffer ();
  38. struct linebuffer *readline ();
  39. #endif
  40.